//by 33hao invite
$(function(){
	    if(getQueryString('store_id')){
		    var store_id =  getQueryString('store_id');
		}else {
			var store_id = getCookie('store_id');
		}
		if(getQueryString('mid')){
			var mid =  getQueryString('mid');
		}else {
			var mid = getCookie('mid');
		}
		if(mid==''){
			location.href = 'login.html';
		}
	$.ajax({
		type: 'post',
		url: ApiUrl + "/index.php?act=member_invite&op=getBg&type=store",
		data: {mid: mid},
		dataType: 'json',
		//jsonp:'callback',
		success: function (result) {
			document.getElementById('eweima').style.background = "url("+result.datas.bgpath+")";
			document.getElementById('eweima').style.backgroundSize = "100% 100%";
			$.ajax({
				type: 'post',
				url: ApiUrl + "/index.php?act=member_invite&op=shop_invite",
				data: {mid: mid, store_id: store_id},
				dataType: 'json',
				//jsonp:'callback',
				success: function (result) {
					// checkLogin(result.login);
					// $('#username').html(result.datas.member_info.user_name);
					// $('#myurl').val(result.datas.member_info.myurl);
					$('#myurl_src').attr("src", result.datas.store_info.myurl_src);
					// $('#avatar').attr("src",result.datas.member_info.avator);
					return false;
				}
			});
		}
	})
});